$OpenBSD: patch-Modules_Qt4ConfigDependentSettings_cmake,v 1.11 2016/11/28 09:15:13 dcoppa Exp $
--- Modules/Qt4ConfigDependentSettings.cmake.orig	Fri Nov 11 15:37:13 2016
+++ Modules/Qt4ConfigDependentSettings.cmake	Fri Nov 25 22:31:45 2016
@@ -21,6 +21,10 @@
 # if a user needs the dependencies, and they couldn't be found, they can set
 # the variables themselves.
 
+include(FindIconv)
+include(FindIntl)
+include(FindLCMS)
+
 set(QT_QTGUI_LIB_DEPENDENCIES "")
 set(QT_QTCORE_LIB_DEPENDENCIES "")
 set(QT_QTNETWORK_LIB_DEPENDENCIES "")
@@ -55,10 +59,6 @@ if(Q_WS_WIN  AND  NOT QT_IS_STATIC)
   set(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
 endif()
 
-if(NOT QT_IS_STATIC)
-  return()
-endif()
-
 # QtOpenGL dependencies
 find_package(OpenGL)
 set (QT_QTOPENGL_LIB_DEPENDENCIES ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
@@ -88,6 +88,15 @@ if(QT_QCONFIG MATCHES "system-mng")
   set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${MNG_LIBRARY})
 endif()
 
+## system lcms
+if(LCMS_FOUND)
+  find_library(LCMS_LIBRARY NAMES lcms)
+  mark_as_advanced(LCMS_LIBRARY)
+  if(LCMS_LIBRARY)
+    set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${LCMS_LIBRARY})
+  endif(LCMS_LIBRARY)
+endif(LCMS_FOUND)
+
 # for X11, get X11 library directory
 if(Q_WS_X11)
   find_package(X11)
@@ -175,6 +184,23 @@ if(QT_QCONFIG MATCHES "system-zlib")
   set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${ZLIB_LIBRARIES})
 endif()
 
+## iconv
+if(ICONV_FOUND)
+  find_library(QT_ICONV_LIBRARY NAMES iconv)
+  mark_as_advanced(QT_ICONV_LIBRARY)
+  if(QT_ICONV_LIBRARY)
+    set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ICONV_LIBRARY})
+  endif(QT_ICONV_LIBRARY)
+endif(ICONV_FOUND)
+
+## libintl
+if(Intl_FOUND)
+  find_library(QT_INTL_LIBRARY NAMES intl)
+  mark_as_advanced(QT_INTL_LIBRARY)
+  if(QT_INTL_LIBRARY)
+    set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_INTL_LIBRARY})
+  endif(QT_INTL_LIBRARY)
+endif(Intl_FOUND)
 
 ## openssl
 if(NOT Q_WS_WIN)
